/**
 * Created by FDD on 2017/5/24.
 * @desc 粗单直箭头
 * @Inherits FineArrow
 */
import FineArrow from './FineArrow'
import { ASSAULT_DIRECTION } from '../../Utils/PlotTypes'
class AssaultDirection extends FineArrow {
  constructor(coordinates, points, params) {
    super(coordinates, points, params)
    /**尾部宽度因子 */
    this.tailWidthFactor = 0.05
    /**颈部宽度因子 */
    this.neckWidthFactor = 0.1
    /**头宽因子 */
    this.headWidthFactor = 0.15
    this.type = ASSAULT_DIRECTION
    /**头角 */
    this.headAngle = Math.PI / 4
    /**颈角 */
    this.neckAngle = Math.PI * 0.17741
    if (points && points.length > 0) {
      this.setPoints(points)
    } else if (coordinates && coordinates.length > 0) {
      this.setCoordinates(coordinates)
    }
    this.set('params', params)
  }
}

export default AssaultDirection
